package com.yuanfeng.business.controller;

import com.yuanfeng.business.dto.ManageShopSelfCatDeleteDTO;
import com.yuanfeng.business.dto.ManageShopSelfCatQueryDTO;
import com.yuanfeng.commoms.dto.userms.UserTokenBeanDTO;
import com.yuanfeng.commoms.util.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ShopSelfCatController
 * @Description 店铺商品分类
 * @Author cf
 * @Date 2023/6/27 13:42
 * @Version 1.0
 */
@RestController
@RequestMapping("/shop/self/cat")
public class ShopSelfCatController extends BaseController{


    /**
     * 查询店铺自定义的分类列表
     *
     * @param param
     * @return
     */
    @PostMapping("/query/list")
    public ResponseResult queryShopSelfCatLists(@RequestBody UserTokenBeanDTO param) {
        return shopSelfCatService.queryShopSelfCatList(param);
    }

    /**
     * 删除店铺自定义的分类
     * @param param
     * @return
     */
    @PostMapping("/delete")
    public ResponseResult deleteShopSelfCat(@RequestBody ManageShopSelfCatDeleteDTO param) {
        return shopSelfCatService.deleteShopSelfCat(param);
    }

    /**
     * 查询店铺自定义的分类
     * @param param
     * @return
     */
    @PostMapping("/query")
    public ResponseResult queryShopSelfCat(@RequestBody ManageShopSelfCatQueryDTO param) {
        return shopSelfCatService.queryShopSelfCat(param);
    }
}
